import xxRequest from "./service"
const cookie = wx.getStorageSync('cookies')
// 获取用户基本数据
export function getUserInfo(uid) {
  return xxRequest.get("/user/detail",{uid})
}
// 获取用户歌单
export function getUserPlaylist(uid) {
  return xxRequest.get("/user/playlist",{uid})
}
// 获取用户播放记录
export function getUserRecord(uid,type="1") {
  return xxRequest.get("/user/record",{uid,type})
}
// 获取用户歌单详情
export function getMySonglistDetail(id) {
  return xxRequest.get("/playlist/detail",{id,cookie})
}
// 获取用户云盘 (需登录)
export function getUserCloud(limit=30,offset=0) {
  return xxRequest.get("/user/cloud",{limit,offset,cookie})
}
// 根据云盘id 获取真正的播放链接
export function getSongUrl(id) {
  return xxRequest.get("/song/url",{id,cookie})
}
// 播放云盘音乐
// export function getUserCloudDetail(id) {
//   return xxRequest.get("/user/cloud",{id})
// }